package com.neusoft.elmboot.service.Impl;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.elmboot.mapper.IntegralTransMapper;
import com.neusoft.elmboot.po.IntegralTrans;
import com.neusoft.elmboot.service.IntegralTransService;
import com.neusoft.elmboot.util.CommonUtil;

@Service
public class IntegralTransServiceImpl implements IntegralTransService{
	@Autowired
	IntegralTransMapper integralTransMapper;
	
	@Override
	public List<IntegralTrans> listIntergralTransByUserId(String userId) {
		return integralTransMapper.listIntergralTransByUserId(userId);
	}
	
	@Override
	public int saveIntegralTrans(IntegralTrans integralTrans) {
		integralTrans.setTime(CommonUtil.getCurrentDate());
		return integralTransMapper.saveIntegralTrans(integralTrans);
	}
}
